package SignAndRegister;

import javax.swing.*;
import java.awt.*;

public class RemindWindow extends JFrame {

    public RemindWindow(String remindString){

        JPanel signRemindPanel = new JPanel();
        this.add(signRemindPanel);
        signRemindPanel.setLayout(null);

        JLabel jLabel = null;

        if(remindString.equals("ID")){
            jLabel = new JLabel("无该用户ID，请确认ID是否错误");
        } else if (remindString.equals("Code")) {
            jLabel = new JLabel("密码错误，请确认ID是否错误或密码是否错误");
        } else if (remindString.equals("Type")) {
            jLabel = new JLabel("账户类型错误，请重新确认账户类型");
        } else if (remindString.equals("IDType")){
            jLabel = new JLabel("请检查用户ID是否为纯数字");
        } else if (remindString.equals("Register")) {
            jLabel = new JLabel("该ID已被占用，请更改ID");
        } else if (remindString.equals("CustomerRegisterSuccess")){
            jLabel = new JLabel("注册成功，请登录账号");
        } else if (remindString.equals("OtherRegisterSuccess")) {
            jLabel = new JLabel("注册成功，请等待系统管理员确认");
        } else if (remindString.equals("RegisterPleaseCancel")) {
            jLabel = new JLabel("该ID已被占用，请取消该申请");
        } else if (remindString.equals("DeleteFailure")){
            jLabel = new JLabel("删除失败呢！");
        } else if (remindString.equals("ModifyFailure")){
            jLabel = new JLabel("修改失败呢！");
        } else if (remindString.equals("NoThisAccount")) {
            jLabel = new JLabel("没有该用户呢！");
        } else if (remindString.equals("AddingFailure")) {
            jLabel = new JLabel("添加用户失败呢！");
        } else if (remindString.equals("PleaseChooseAccountType")) {
            jLabel = new JLabel("请选择用户类型！");
        } else if (remindString.equals("PleaseFillAccountID")) {
            jLabel = new JLabel("请填写用户ID！");
        } else if (remindString.equals("ModifyingFailure")) {
            jLabel = new JLabel("修改用户失败呢！");
        } else if (remindString.equals("DontModifyType")) {
            jLabel = new JLabel("不能更改用户类型！");
        } else if (remindString.equals("ModifySuccess")) {
            jLabel = new JLabel("修改成功呢！");
        } else if (remindString.equals("ModifyFailure")) {
            jLabel = new JLabel("修改失败呢！");
        } else if (remindString.equals("NoThisRoom")) {
            jLabel = new JLabel("没有该房间呢！");
        } else if (remindString.equals("PleaseFillRoomID")) {
            jLabel = new JLabel("请正确输入房间号");
        } else if (remindString.equals("PleaseFillRoomType")) {
            jLabel = new JLabel("请正确选择房间类型");
        } else if (remindString.equals("PleaseFillCodeCorrectly")) {
            jLabel = new JLabel("请正确填写房间密码");
        } else if (remindString.equals("AddingRoomFailure")) {
            jLabel = new JLabel("添加房间失败呢！");
        } else if (remindString.equals("PleaseChooseRoomTypeCorrectly")) {
            jLabel = new JLabel("请正确选择房间类型！");
        } else if (remindString.equals("PleaseChooseRoomStatusCorrectly")) {
            jLabel = new JLabel("请正确选择房间状态！");
        } else if (remindString.equals("ModifyingRoomFailure")) {
            jLabel = new JLabel("修改房间失败！");
        }else if (remindString.equals("NoThisReserve")) {
            jLabel = new JLabel("没有这个订单呢！");
        }else if (remindString.equals("PleaseFillReserveID")) {
            jLabel = new JLabel("请填写订单号！");
        }else if (remindString.equals("PleaseFillReserveStatus")) {
            jLabel = new JLabel("请填写订单状态！");
        }else if (remindString.equals("PleaseFillCustomerID")) {
            jLabel = new JLabel("请填写订单用户！");
        }else if (remindString.equals("PleaseFillReserveAmount")) {
            jLabel = new JLabel("请填写订单总金额！");
        }else if (remindString.equals("PleaseFillInAndOutDate")) {
            jLabel = new JLabel("请正确填写订单入住日期和离店日期！");
        }else if (remindString.equals("PleaseFillReserveRoomType")) {
            jLabel = new JLabel("请填写预期房间类型！");
        }else if (remindString.equals("AddingReserveFailure")) {
            jLabel = new JLabel("添加订单失败呢！");
        }


        signRemindPanel.add(jLabel);
        jLabel.setBounds(25,50,250,100);

        //设置登录界面的一些参数：背景颜色、标题、大小、位置、是否可调大小、是否可见
        this.setBackground(Color.white);
        setTitle("提醒界面");
        setBounds(0, 0, 300, 200);
        setLocationRelativeTo(null);//居中显示
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);  //用户单击窗口的关闭按钮时程序执行的操作
        setResizable(false);
        setVisible(true);

    }

}
